package cn.it.controller;

import cn.it.Service.IUserService;
import cn.it.util.Result;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    IUserService iUserService;
    @RequestMapping("/login")
    public Object login(String code ,String avatarUrl , String nickName) {


        Result login = iUserService.login(code, avatarUrl, nickName);


        return login;
    }

}
